14 3-dimensional
I love 3D and wish I had more time to work on the webmorph 3D functions (I made the following gif using it).

But those are made with three.js and I was excited to play with rgl a bit.
14.1 Load OBJ
Load the 3D data from an OBJ file using rgl::readOBJ(). If you get the error "Error in order(vlinks[[i]][, 2]) : argument 1 is not a vector", this means a vertex was empty, which the function doesn't seem to be able to handle. I hacked the readOBJ() function a bit and fixed it, so check my github for this if you have the same problem.
obj <- "data/lisa_neutral.obj"
skin <- "data/lisa_neutral.png"
objexample <- readOBJ(
obj,
material = list(color = "white",
texture = skin))Just to give you nightmares, this is what the skin looks like for a 3D face in 2D:

14.2 Render scene
Now clear a scene. You might need to install XQuartz if you're on a mac. If you're running this interactively, a small XQuartz window should pop up.
Add the face as a wireframe object.
wire3d(objexample)You can include this in a webpage with rglwidget().
rglwidget(width = 600, height = 800)